<template>
  <div class="a">
      <van-swipe @change="onChange" :autoplay="3000">
  <van-swipe-item>
      <img src="/7.jpg" alt="" class="img">
  </van-swipe-item>
  <van-swipe-item>
       <img src="/8.jpg" alt="" class="img">
  </van-swipe-item>
  <van-swipe-item>
       <img src="/9.jpg" alt="" class="img">
  </van-swipe-item>
  <template #indicator>
    <div class="custom-indicator">
      {{ current + 1 }}/3
    </div>
  </template>
</van-swipe>
  </div>
</template>

<script>
export default {
      data() {
    return {
      current: 0,
    };
  },
  methods: {
    onChange(index) {
      this.current = index;
    },
  },

}
</script>

<style scoped>

 .custom-indicator {
    position: absolute;
    right: 0.05rem;
    bottom: 0.05rem;
    padding: 0.02rem 0.05rem;
    font-size: 0.12rem;
    background: rgba(0, 0, 0, 0.1);
  }
  .img{
      width: 100%;
      height: 3.75rem;
      vertical-align: middle;
      border: none;
  }
</style>